package com.maychat.enums;

public enum JoinType {
    DIRECT("直接加入"),
    CHECK_FIRST("需要审核");
    private String desc;

    JoinType(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public static JoinType getByOrdinal(int ordinal) {
        return switch (ordinal) {
            case 0 -> JoinType.DIRECT;
            case 1 -> JoinType.CHECK_FIRST;
            default -> null;
        };
    }
}
